package lqk.cast.algorithm.lineartest;

import lqk.cast.algorithm.linear.SequenceList;

public class SequenceListTest2 {
    public static void main(String[] args) {
        //创建顺序表对象
        SequenceList<String> sl = new SequenceList<>(3);

        sl.insert("姚明");
        sl.insert("科比");
        sl.insert("麦迪");
        sl.insert(1,"詹姆斯");
        System.out.println(sl.length());
        for (String s:sl){
            System.out.println(s);
        }
        sl.clear();
        System.out.println("-------------------");
        for (String s:sl){
            System.out.println(s);
        }
        System.out.println(sl.length());
        System.out.println(sl.get(0));
        sl.insert("姚明");
        sl.insert("科比");
        sl.insert("麦迪");
        sl.insert(1,"詹姆斯");
        System.out.println(sl.length());
        for (String s:sl){
            System.out.println(s);
        }
    }
}
